import React from 'react'

export default function withLogin(Comp) {
  return function LoginWrapper(props,ref){
    console.log(ref)
    console.log(props)
    console.log(`日志：组件${Comp.name}`)
      if(props.isLogin){
        console.log(`日志：组件${Comp.name}登录${Date.now()}`)
        return <Comp {...props} />
      }
      console.log(`日志：组件${Comp.name}没有登录${Date.now()}`)
      return null

  }
}
